<template>
 <van-nav-bar
    title="用户中心"
    left-text="返回"
    right-text="退出"
    left-arrow
    @click-left="$router.back()"
    @click-right="userQuite"
  />
  <van-cell-group title="个人中心" inset>
    <van-cell title="地址管理" is-link to="/regist" />
    <van-cell title="订单中心 " is-link to="/regist" />
  </van-cell-group>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useUsrInfoStore } from '@/stores/userinfo';
import { useRouter } from 'vue-router';
import { showSuccessToast,} from 'vant';


const store = useUsrInfoStore();
const router = useRouter();

const userQuite = ()=>{
store.setUserToken("");
localStorage.setItem("userToken","");
router.push("/");
showSuccessToast("退出成功")

}
</script>

<style lang="scss" scoped>
</style>